package com.ly.heart.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 销售价目对象 erp_sale_marked_price
 *
 * @author wutao
 * @date 2024-07-15
 */
@TableName("erp_sale_marked_price")
@ApiModel(value = "erp_sale_marked_price对象", description = "销售价目")
@Data
@Accessors(chain = true)
public class SaleMarkedPriceEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 销售价目表主键id
     */
    @TableId(type = IdType.INPUT)
    private String id;


    /**
     * 订单编号
     */
    @ApiModelProperty("订单编号")
    @TableField("price_code")
    @Excel(name = "价目编号")
    private String priceCode;

    /**
     * 组织
     */
    @ApiModelProperty("组织")
    @TableField("dept_id")
    @Excel(name = "组织")
    private String deptId;

    /**
     * 名称
     */
    @ApiModelProperty("名称")
    @TableField("marked_price_name")
    @Excel(name = "名称")
    private String markedPriceName;

    /**
     * 币别
     */
    @ApiModelProperty("币别")
    @TableField("currency_id")
    @Excel(name = "币别")
    private String currencyId;

    /**
     * 价目对象(下拉框先写死)
     */
    @ApiModelProperty("价目对象(下拉框先写死1物料2物料分组)")
    @TableField("price_object")
    @Excel(name = "价目对象(下拉框先写死1物料2物料分组)")
    private String priceObject;

    /**
     * 有效期
     */
    @ApiModelProperty("有效期")
    @TableField("expiration_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /**
     * 失效期
     */
    @ApiModelProperty("失效期")
    @TableField("lose_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "失效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date loseDate;

    /**
     * 是否含税（0否1是）
     */
    @TableField("including_tax")
    @ApiModelProperty("是否含税")
    @Excel(name = "是否含税", readConverterExp = "0=否1是")
    private String includingTax;

    /**
     * 是否启用(1是2否)
     */
    @ApiModelProperty("是否启用(1是2否)")
    @TableField("is_used")
    @Excel(name = "是否启用(1是2否)")
    private String isUsed;

    /**
     * 状态
     */
    @ApiModelProperty("状态")
    @TableField("state")
    @Excel(name = "状态")
    private String state;

    /**
     * 限定客户下拉框(0:客户;1客户分组;2客户分类)联动适用客户
     */
    @ApiModelProperty("限定客户下拉框(0:客户;1客户分组;2客户分类)联动适用客户")
    @TableField("restrict_customer")
    @Excel(name = "限定客户下拉框(0:客户;1客户分组;2客户分类)联动适用客户")
    private String restrictCustomer;

    /**
     * 限定销售员(0:销售员;1:销售组;2:部门)联动适用销售员
     */
    @ApiModelProperty("限定销售员(0:销售员;1:销售组;2:部门)联动适用销售员")
    @TableField("restrict_sale")
    @Excel(name = "限定销售员(0:销售员;1:销售组;2:部门)联动适用销售员")
    private String restrictSale;

    /**
     * 价格类型(dialog)
     */
    @ApiModelProperty("价格类型(dialog)")
    @TableField("price_type")
    @Excel(name = "价格类型(dialog)")
    private String priceType;

    /**
     * 不参与严控价目表定价检查(0否1是)
     */
    @ApiModelProperty("不参与严控价目表定价检查(0否1是)")
    @TableField("is_strictly_control")
    @Excel(name = "不参与严控价目表定价检查(0否1是)")
    private String isStrictlyControl;

    @ApiModelProperty("是否引用1是2否")
    @TableField("is_quote")
    @Excel(name = "是否引用1是2否")
    private String isQuote;

    /**
     * 流程实例id
     */
    @ApiModelProperty("流程实例id")
    @TableField("instance_id")
    @Excel(name = "流程实例id")
    private String instanceId;

    @ApiModelProperty("业务type")
    @TableField (exist = false)
    private String businessType;

    @ApiModelProperty("流程模型id")
    @TableField (exist = false)
    private String modelId;

    @ApiModelProperty("适用客户")
    @TableField(exist = false)
    private List<SaleMarkedCustomerEntity> saleMarkedCustomerEntities;

    @ApiModelProperty("适用销售")
    @TableField(exist = false)
    private List<SaleMarkedCustomerEntity> saleMarkedSaleEntities;

    @ApiModelProperty("价目表详情")
    @TableField(exist = false)
    private List<SaleMakedDetailEntity> saleMakedDetailEntities;
}
